home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 1997
/
HAM Radio 1997.iso
/
vcls
/
rbanding
/
rbanding.txt
< prev
next >
Wrap
Text File
|
1996-04-08
|
877b
|
18 lines
Okay, here is a simple minded rubberbanding example.
There is a minor bug in it that sometimes leaves a small WHITE image
on the canvas, but I will leave that to the student to fix :-)
Although the rubberbanding does not DO anything, adding that functionality
would not be difficult ( I have already done so, with a CAD style program).
One approach would be to use the final shape (rectangle, ellipse) as a region
and check all drawn 'objects' for inclusion in the region's space. Of course,
this requires you to keep a list of objects drawn on the work area, so you can
check bounding coords against the banded area. The best place to do this is in
the MouseUp handler, after the final shape has been drawn.
I leave it to you to experiment with different, multiple background colors
(does the rubberband disappear?), and other considerations.
Have Fun!